<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

require dirname(__FILE__).'/pc_controller.php';

require_once dirname(__FILE__).'/menu.php';

class Football_game_history extends PC_controller {

    public function __construct(){
        parent::__construct();
        $this->load->model('Footballgamecustomermodel','m_customer');
    }

    public function index(){
        $data = parent::index();

        $this->load->view('admin/football_game_history',$data);
    }

    public function getGameHistoryList() {
        $assist['where'] = getFilter($this->input->post(),Footballgamecustomermodel::$historySearchField);
        $assist['like'] = getFilter($this->input->post(),Footballgamecustomermodel::$historyLikeField);
        $assist['sort'] = getSort($this->input->post(),Footballgamecustomermodel::$sortField);
        $assist['pagination'] = getPagination($this->input->post());

        $assist['select'] = '
            football_game_customer.customer_id,
            football_game_customer.nickname,
            football_game_history.*
        ';
        list($list,$count) = $this->m_customer->getGameHistoryListSection($assist);

        foreach ($list as $key => $value) {
            $list[$key]['nickname'] = urldecode($value['nickname']);
        }

        $this->response->setSuccess();
        $this->response->setItems($list);
        $this->response->setTotalCount($count);
        $this->response->responseExit();
    }

}
/* End of file aa_game_history.php */
/* Location: ./application/controllers/aa_game_history.php */